<template>
  <uni-popup ref="fillState" type="center" :is-mask-click="false">
    <view class="fillState">
      <view style="margin-bottom: 10rpx;">调整前{{type}}:{{changeMoney.money}}</view>
      <view style="margin-bottom: 10rpx;">调整{{type}}:{{changeMoney.price}}</view>
      <view style="margin-bottom: 20rpx;">调整后{{type}}:{{changeMoney.total}}</view>
      <Button @cancel="closeBankPad" @confirm="submit()" style="margin-top:20rpx"></Button>
    </view>
  </uni-popup>
</template>

<script setup lang="ts">
  import Button from './buttom.vue';
  import { ref } from 'vue';
  const props = defineProps({
    changeMoney: { type: Object },
    type: { type: String }
  });
  const emit = defineEmits(['submit']);
  const fillState = ref(null)
  function submit() {
    closeBankPad()
    emit('submit')
  }
  // 开关修改退款金额弹框
  function openBankPad() {
    fillState.value.open();
  }
  function closeBankPad() {
    fillState.value.close();
  }
  defineExpose({ openBankPad });
</script>

<style scoped lang="less">
  .fillState {
    width: 650rpx;
    background-color: white;
    border-radius: 5px;
    padding: 30rpx 30rpx 40rpx 30rpx;
    box-sizing: border-box;
  }

  input {
    width: 100%;
    height: 62rpx;
    background: #ECF0F6;
    border-radius: 5px;
    padding-left: 20rpx;
    box-sizing: border-box;
    margin: 0rpx 0px 40rpx;
  }
</style>